package lab02.test03;

public class Student {
    double ITscore=88.5;
    double mathscore=99;
    double englishscore=57;
    double sum;
    double average;
    double max;
    double min;
    public void sum (){
        sum=ITscore+mathscore+englishscore;
        System.out.println("sum:"+sum);
    }
    public void average () {
        average=(ITscore+mathscore+englishscore)/3;
        System.out.println("average:"+average);
    }
    public void max  (){
        if (ITscore<englishscore){
            if (mathscore<englishscore){
                System.out.println("最大值:"+englishscore);
            }else {
                System.out.println("最大值:"+mathscore);
            }

        }else {
            if (mathscore<englishscore) {
                System.out.println("最大值:"+ITscore);
            }
            if (mathscore<ITscore) {
                System.out.println("最大值:" + ITscore);
            }else {
                System.out.println("最大值:" + mathscore);
            }
        }
    }
    public void min   (){
        if (ITscore>englishscore){
            if (mathscore<englishscore){
                System.out.println("最小值:"+mathscore);
            }else {
                System.out.println("最小值:"+englishscore);
            }

        }else {
            if (mathscore>englishscore) {
                System.out.println("最小值:"+ITscore);
            }
            if (mathscore<ITscore) {
                System.out.println("最小值:" + mathscore);
            }else {
                System.out.println("最小值:" + ITscore);
            }
        }
    }

}
